package creational.factory.simple_factory;

public class SimpleFactory {

    // 咖啡工厂生成咖啡方法
    public static Coffee getCoffee(String type){
        Coffee coffee = null;

        if (type.equals("冰美式")){
            coffee = new Americano();
        }else if(type.equals("拿铁")) {
            coffee = new Latte();
        }
        return coffee;
    }

}
